package com.zhibang.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhibang.annotation.DictQuery;
import com.zhibang.dto.CustomerDTO;
import com.zhibang.entity.Account;
import com.zhibang.entity.Customer;
import com.zhibang.entity.Menu;
import com.zhibang.service.CustomerService;
import com.zhibang.util.Result;
import com.zhibang.vo.CustomerHealthInfoVO;
import com.zhibang.vo.IndexMenuVo;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresGuest;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

import static cn.hutool.poi.excel.sax.ElementName.c;

/**
 * @autor 流萤微微
 * @date 2025年03月06日 18:40
 */
@RestController
@RequestMapping("customer")
public class CustomerController {
    @Resource
    private CustomerService cs;

    @RequestMapping("test")
    @DictQuery
    public Result test() {
        return Result.data(cs.list());
    }

    @RequestMapping("selectjcjl/{pageNum}/{pageSize}")
    public Result selectjcjl(@RequestBody CustomerDTO CustomerDTO,
                             @PathVariable Integer pageNum,
                             @PathVariable Integer pageSize) {
        IPage<CustomerHealthInfoVO> iPage = new Page<>(pageNum,pageSize);
        cs.selectjcjl(CustomerDTO,iPage);
        return Result.data(iPage);
    }


}
